package heima3_2.cn.osc.presenter;

import java.util.List;

import heima3_2.cn.osc.base.OurTabBaseFragment;
import heima3_2.cn.osc.base.OurTabBasePresenter;
import heima3_2.cn.osc.model.bean.ActiveBean;
import heima3_2.cn.osc.model.bean.CallMeBean;
import retrofit2.Call;
import retrofit2.Response;

/**
 * Created by yaozhanlie on 2017/1/18.
 */

public class CallMePresenter extends OurTabBasePresenter<CallMeBean, ActiveBean> {
    public CallMePresenter(OurTabBaseFragment ourTabBaseFragment) {
        super(ourTabBaseFragment);
    }

    @Override
    protected void doRetrofitQuest() {
        Call<CallMeBean> login = mRetrofitInterface.getMessageInfo(3231178, 0, 2, 20);
        login.enqueue(mCallback);
    }

    @Override
    public List<ActiveBean> getDataBean(Response<CallMeBean> response) {
        return response.body().getActivies();
    }


//
////    private int mUid;
//
//    @Override
//    protected void getFailureData(Throwable t) {
//        t.printStackTrace();
//    }
//
//    @Override
//    protected void getSuccessData(Response<CallMeBean> response) {
//        int a = response.body().getActiveCount();
//        List<ActiveBean> activies = response.body().getActivies();
//        String author = activies.get(0).getAuthor();
//        Log.d("aaa", "getSuccessData: "+a+"         "+author);
//
//    }
//
//    @Override
//    public void getData(int page) {
//        Call<CallMeBean> login = mRetrofitInterface.getMessageInfo(3231178,0,2,20);
//        login.enqueue(mCallback);
//    }
}
